c_ = sparse(58,1);
c_(1) = 1;
b_ = sparse(48,1);
b_(7:9) = d;
b_(16:16) = e;
b_(17:17) = -0.5;
b_(18:18) = -0.5;
b_(39:48) = b;
A_ = sparse(48, 58);
A_(1:3, 31:33) = 1.0*speye(3, 3); A_(1:3, 34:36) = -1.0*speye(3, 3);
A_(4:6, 13:17) = C; A_(4:6, 31:33) = -1.0*speye(3, 3);
A_(7:9, 34:36) = 1.0*speye(3, 3);
A_(10:10, 37:37) = 1.0; A_(10:10, 2:2) = 1.0; A_(10:10, 38:38) = -1.0;
A_(11:15, 37:37) = 1.0*ones(5, 1); A_(11:15, 8:12) = -1.0*speye(5, 5); A_(11:15, 3:7) = -1.0*speye(5, 5);
A_(16:16, 38:38) = 1.0;
A_(17:17, 1:1) = 0.5; A_(17:17, 18:18) = -1.0;
A_(18:18, 1:1) = -0.5; A_(18:18, 19:19) = -1.0;
A_(19:28, 39:48) = 1.0*speye(10, 10); A_(19:28, 49:58) = -1.0*speye(10, 10); A_(19:28, 21:30) = -1.0*speye(10, 10);
A_(29:38, 13:17) = A; A_(29:38, 39:48) = -1.0*speye(10, 10);
A_(39:48, 49:58) = 1.0*speye(10, 10);
G_ = sparse(30, 58);
G_(1:1:1, 2:2) = -speye(1, 1);
G_(2:1:6, 3:7) = -speye(5, 5);
G_(7:2:16, 8:12) = -speye(5, 5);
G_(8:2:17, 13:17) = -speye(5, 5);
G_(17:1:17, 18:18) = -speye(1, 1);
G_(18:1:18, 19:19) = -speye(1, 1);
G_(19:1:19, 20:20) = -speye(1, 1);
G_(20:1:20, 20:20) = -speye(1, 1);
G_(21:1:30, 21:30) = -speye(10, 10);
h_ = zeros(30, 1);
dims.q = [2,2,2,2,2,3,11];
dims.l = 6;
% [c_new,G_new,h_new,dims_new,A_new] = prob2fixedcones(c_,G_,h_,dims,A_,3);
% clear opts
%opts.feastol = eps^(1/2);
% opts.verbose = true;
% opts.maxit = 10;
%opts.abstol = eps^(1/2);
%opts.reltol = eps^(1/2);
%opts.maxit = 30;
% opts = ecosoptimset;
[x_codegen, y_, info_] = ecos(full(c_), G_, h_, dims, A_, full(b_));
% [x_codegen, y_, info_] = ecos(full(c_new), G_new, h_new, dims_new, A_new, full(b_));
t3 = x_codegen(1:1);
t7 = x_codegen(2:2);
t6z0 = x_codegen(3:7);
t6s0 = x_codegen(8:12);
x = x_codegen(13:17);
t3z0 = x_codegen(18:18);
t3z1 = x_codegen(19:19);
t2 = x_codegen(20:20);
t1 = x_codegen(21:30);
t4 = x_codegen(31:33);
pd = x_codegen(34:36);
t6 = x_codegen(37:37);
pe = x_codegen(38:38);
t0 = x_codegen(39:48);
pb = x_codegen(49:58);
ecos_optval = 1*info_.pcost;
